<extend name="Public/base" />
<block name="body">
<div class="m-tab s-tab">
  <h2 class="u-tt">用户管理</h2>
  <ul>
    <li><a href="{:U('member/index')}">用户列表</a></li>
    <li class="z-crt"><a href="">{$actionName}用户</a></li>
  </ul>
</div>
<div class="m-form">
  <form name="" action="{:U($action)}" method="post" id="form">
    <fieldset>
      <div class="formitm">
        <label class="lab">账号：</label>
        <div class="ipt">
        <?php if(empty($info['username'])) {?>
        <input type="text" id="username" name="username" class="u-ipt u-ipt-5"  placeholder="用户名" value="" datatype="s4-18" errormsg="用户名至少4个字符,最多18个字符！">  
        <?php }else{ ?> <?php echo $info['username']; }?>
          <p></p>
        </div>
      </div>
      <div class="formitm">
        <label class="lab">角色：</label>
        <div class="ipt">
          <select id="roleid" name="roleid" class="u-slt">
            <volist name="Role" id="vo">
            <option value="{$vo.id}" <if condition="$vo['id'] === $info['roleid']">selected="selected"</if>>{$vo.title}</option>
            </volist>
          </select>
          <p></p>
        </div>
      </div>      
      <div class="formitm">
        <label class="lab">昵称：</label>
        <div class="ipt">
          <input name="nickname" type="text" class="u-ipt u-ipt-5" id="nickname" value="{$info.nickname}" maxlength="18" datatype="s3-18" errormsg="昵称至少3个字符,最多18个字符！" placeholder="昵称"/>
          <p></p>
        </div>
      </div>
      <div class="formitm">
        <label class="lab">邮箱：</label>
        <div class="ipt">
          <input name="email" type="text" class="u-ipt u-ipt-5" id="email" {:isset($info['email'])?'readonly="true"':''} value="{$info.email}"  value="{$info.email}" maxlength="25" datatype="e" errormsg="邮箱格式不正确！" placeholder="邮箱"/>
          <p></p>
        </div>
      </div>
      <div class="formitm">
        <label class="lab">密码：</label>
        <div class="ipt">
          <input name="password" type="password" class="u-ipt u-ipt-5" id="password" {:isset($info['uid'])?'ignore="ignore" placeholder="不修改密码请留空"':'placeholder="密码至少4个字符,最多18个字符！"'} value="" maxlength="18" datatype="*4-18" errormsg="密码至少4个字符,最多18个字符！" />
          <span class="suffix"></span> 
          <p></p>
        </div>
      </div>
      <div class="formitm">
        <label class="lab">重复密码：</label>
        <div class="ipt">
          <input name="password2" type="password" class="u-ipt u-ipt-5" id="password2" {:isset($info['uid'])?'ignore="ignore" placeholder="不修改密码请留空"':'placeholder="密码至少4个字符,最多18个字符！"'} value="" maxlength="18"  datatype="*" recheck="password" errormsg="您两次输入的密码不一致！" />
          <p></p>
        </div>
      </div>
        <div class="formitm">
          <label class="lab" >性别：</label>
          <div class="ipt">
            <label class="u-opt">
              <input name="sex" type="radio" value="0" <if condition="$info['sex'] == 0">checked</if>/>
              男</label>
            <label class="u-opt">
              <input name="sex" type="radio" value="1" <if condition="$info['sex'] == 1">checked</if>/>
              女</label>
          </div>
        </div>
      <div class="formitm">
        <label class="lab">QQ号码：</label>
        <div class="ipt">
          <input name="qq" type="text" class="u-ipt u-ipt-3" id="qq" ignore="ignore" value="{$info.qq}" maxlength="18"  datatype="n" errormsg="QQ号只能为整数" placeholder="QQ号码"/>
          <p></p>
        </div>
      </div>
      <div class="formitm">
        <label class="lab">生日：</label>
        <div class="ipt">
          <input name="birthday" type="text" class="u-ipt u-ipt-3 u-time" id="birthday" value="{$info.birthday}" maxlength="250"  />
          <p></p>
        </div>
      </div>

        <div class="formitm">
          <label class="lab" >状态：</label>
          <div class="ipt">
            <label class="u-opt">
              <input name="status" type="radio" value="1" <if condition="$info['status'] == 1">checked</if>/>
              启用</label>
            <label class="u-opt">
              <input name="status" type="radio" value="0" <if condition="$info['status'] == 0">checked</if>/>
              禁用</label>
          </div>
        </div>
      
      <div class="formitm formitm-1  formitm-2">
        <input name="uid" type="hidden" value="{$info.uid}" />
        <button class="u-btn" type="submit">保存</button>
        <button class="u-btn s-btn-c3" type="reset">重置</button>
        <span class="status" id="status"></span> </div>
    </fieldset>
  </form>
</div>
<script>
Do.ready('base','form','dialog','color','editor','sort','upload','calendar','tabs',function() {
  $('#form').duxFormPage({
    returnUrl:"{:U('Member/index')}"
  });
});
</script>
</block>
<block name="script">
</block>
